
<script type="text/javascript">
	var form_name = 'postform';
	var text_name = <!-- IF $SIG_EDIT -->'signature'<!-- ELSE -->'message'<!-- ENDIF -->;
	var load_draft = false;
	var upload = false;

	lang.enter_link_url = '{LA_ENTER_LINK_URL}';
	lang.enter_image_url = '{LA_ENTER_IMAGE_URL}';
	lang.enter_quote_name = '{LA_ENTER_QUOTE_NAME}';
	lang.enter_list_start = '{LA_ENTER_LIST_START}';
	lang.enter_title = '{LA_ENTER_TITLE}';

	// Define the bbCode tags
	var bbcode = new Array();
	var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[tt]','[/tt]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]','[s]','[/s]','[spoiler]','[/spoiler]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>

<!-- IF S_BBCODE_ALLOWED -->
<div id="format-buttons">
	<button type="button" accesskey="b" style="width: 24px;" onclick="bbstyle(0, event)" title="{L_BBCODE_B_HELP}"><span style="font-weight: bold;">B</span></button>
	<button type="button" accesskey="i" style="width: 24px;" onclick="bbstyle(2, event)" title="{L_BBCODE_I_HELP}"><span style="font-style: italic;">I</span></button>
	<button type="button" accesskey="u" style="width: 24px;" onclick="bbstyle(4, event)" title="{L_BBCODE_U_HELP}"><span style="text-decoration: underline;">U</span></button>
	<button type="button" accesskey="s" style="width: 24px;" onclick="bbstyle(22, event)" title="{L_BBCODE_STRIKE_HELP}"><span style="text-decoration: line-through;">&nbsp;S&nbsp;</span></button>
	<button type="button" accesskey="t" style="width: 24px;" onclick="bbstyle(12, event)" title="{L_BBCODE_TT_HELP}"><span style="font: 1em/1em monospace;">TT</span></button>
	<!-- IF S_BBCODE_QUOTE -->
		<button type="button" accesskey="q" onclick="bbstyle(6, event)" title="{L_BBCODE_Q_HELP}">Quote</button>
	<!-- ENDIF -->
	<!-- IF S_BBCODE_SPOILER -->
		<button type="button" accesskey="h" onclick="bbstyle(24, event)" title="{L_BBCODE_SPOILER_HELP}">Spoiler</button>
	<!-- ENDIF -->
	<button type="button" accesskey="c" onclick="bbstyle(8, event)" title="{L_BBCODE_C_HELP}">Code</button>
	<button type="button" accesskey="l" onclick="bbstyle(10, event)" title="{L_BBCODE_L_HELP}">List</button>
	<button type="button" accesskey="y" onclick="insert_listitem()" title="{L_BBCODE_LISTITEM_HELP}">[*]</button>
	<!-- IF S_BBCODE_IMG -->
		<button type="button" accesskey="p" onclick="bbstyle(14, event)" title="{L_BBCODE_P_HELP}">Img</button>
	<!-- ENDIF -->
	<!-- IF S_LINKS_ALLOWED -->
		<button type="button" accesskey="w" onclick="bbstyle(16, event)" title="{L_BBCODE_W_HELP}"><span style="text-decoration: underline;">URL</span></button>
	<!-- ENDIF -->
	<!-- IF S_BBCODE_FLASH -->
		<button type="button" accesskey="d" onclick="bbstyle(18, event)" title="{L_BBCODE_D_HELP}">Flash</button>
	<!-- ENDIF -->
	<!-- IF MIN_FONT_SIZE != 100 or MAX_FONT_SIZE != 100 -->
	<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');jQuery('option[value=100]', this).prop('selected', true);" title="{L_BBCODE_F_HELP}">
		<!-- IF not MIN_FONT_SIZE or MIN_FONT_SIZE <= 50 --><option value="50">{L_FONT_TINY}</option><!-- ENDIF -->
		<!-- IF not MIN_FONT_SIZE or MIN_FONT_SIZE <= 85 --><option value="85">{L_FONT_SMALL}</option><!-- ENDIF -->
		<option value="100" selected="selected">{L_FONT_NORMAL}</option>
		<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 --><option value="150">{L_FONT_LARGE}</option><!-- ENDIF -->
		<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 --><option value="200">{L_FONT_HUGE}</option><!-- ENDIF -->
	</select>
	<!-- ENDIF -->
	<button type="button" onclick="change_palette();" title="{L_BBCODE_S_HELP}" id="bbpalette">{L_FONT_COLOR}</button>
	<!-- BEGIN custom_tags -->
		<button type="button" onclick="bbstyle({custom_tags.BBCODE_ID}, event)" title="{custom_tags.BBCODE_HELPLINE}">{custom_tags.BBCODE_TAG}</button>
	<!-- END custom_tags -->
</div>

<div id="colour_palette" style="display: none;">
	<dl style="clear: left;">
		<dt><label>{L_FONT_COLOR}:</label></dt>
		<dd>
		<script>
			function change_palette()
			{
				dE('colour_palette');
			}

			colorPalette('h', 15, 10);
		</script>
		</dd>
	</dl>
</div>
<!-- ENDIF -->
